package com.masu.knows.portal.service;

import com.masu.knows.portal.model.Answer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.masu.knows.portal.vo.AnswerVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 沈传尚
 * @since 2021-12-07
 */
public interface IAnswerService extends IService<Answer> {
    /**
     * 保存讲师回复的答案
     * @return
     */
    Answer saveAnswer(AnswerVo answerVo , String username);


    /**
     * 根据问题id获取回答和评论
     */
    List<Answer> findAnswersAndComments(Integer qid);


    /**
     * 采纳回答
     */
    boolean accept(Integer answerId, String username);



}
